package com.yw.common.core.db.test;

import java.util.Map;

import com.yw.common.core.db.dao.IRetrieve;
import com.yw.common.core.db.dao.IUpdateDao;
import com.yw.common.core.util.DbmUtil;

/**
 * dao测试
 * @author aoshiguchen
 * @time 2015-12-06
 */

public class DaoTest4 {
	
	public static void main(String[] args) throws Exception {
		
		//加载数据库映射文件
		Map<String,IUpdateDao> dbm = DbmUtil.loadDbmFile("app.dbm");
		
		//获取数据库访问对象,进行操作
		IRetrieve dao;
		
		dao = dbm.get("student");
		System.out.println(dao.findAll());
		
		dao = dbm.get("menu");
		System.out.println(dao.findAll());
		
		dao = dbm.get("dept");
		System.out.println(dao.findAll());
	}
}
